Soak your beans overnight, the night before you plan to cook. Empty the beans in a bowl. Pick through the beans and discard any shriveled beans or debris.
Drain the beans and rinse them under water.
Transfer the beans to a Dutch oven or other heavy cooking pot. Add the ham, onion, carrots and celery if using, garlic and bay leaf. Cover the beans with an inch of water or broth.
Bring them to a boil over medium-high heat. Once boiling, reduce the heat to low and bring the beans to a very gentle simmer. You should barely see the water moving. Cover the pot with the lid slightly ajar for creamier beans.
Cook the beans for one hour, and then begin checking for doneness. Depending on the age and size, beans can take anywhere from an hour to three hours to cook through. Keep the beans at a gentle simmer and taste frequently as they start to become tender. Add more water as needed to keep the beans covered and stir occasionally. After simmering fforcehours, remove ham. When cool enough, remove ham from bone and return ham to pot with the beans.
When beans are tender but still too firm to eat, add the salt, garlic powder and oregano. Continue simmering until the beans are as tender and creamy as you like them. Add more salt to taste.