Adding new database wrapper & tests.  Resolves #520
Merge branch 'master' into database-wrapper
Merge pull request #529 from statedecoded/database-wrapper

Database wrapper