Refactor all the things

This is mostly pushing the database calls into the Database class