Seperated database stuff into models