Maven Attempt
Moved DB code into its own class. Needs testing.