closes #12
Merge pull request #13 from rhsu/databaseRefactor

closes #12