Move initial DB functions to appropriate file
Cleanup on aisle "Main"
Move shutdown code into database file
Move input handling to separate file