Minor changes to loading object from db.
Gave the global db objects better names.