Finished database models and wrote a test