In a large oven safe pot, Dutch oven or baking dish, combine soaked beans, 1 cup cooking liquid, onion, ketchup, brown sugar, molasses, salt, mustard, pepper, bay leaf, and bacon (only add bacon if not using ham bone). Mix well. If using ham bone, tuck it into the beans. Cover and bake at 300 degrees for 4-1/2 to 5 hours or until beans are very tender and sauce has thickened to desired consistency. Stir occasionally and add more of the reserved cooking liquid if needed during cooking time.