First pass at saving data
Move the database into the db folder
Refactor out the database connection logic