Database Code for Load Project

Moved database code into load project, removing redundant code.