WIP

Created a separate package to contain all of the db functionality.