Cleaned up the database and fixed #9, fixed #13, fixed #15, and fixed #17