Finished some code for the database. Haven't tested it out yet