cleaned up DB code
cleaned up DB code 2
cleaned up DB code 3
added a .gitignore file to stop git from bothering me