Fixed database bugs
Merge pull request #22 from seancavanaugh/update_databaseAPI

Fixed database bugs