Added database and a mocha test.
Finished database and tests.