Cleaning Up Database and Methods

Hello Atit! 

I saw your project show up on reddit.com/r/coolgithubprojects and I put in some changes to try to help you out. I commented my code and tried to explain what I did in each commit message. 

If you want further collaboration on the project, or you have any questions about my changes, send me a message!