Pulled out database helper functions to their appropriate classes.  GUI
Code cleanup.