Finished and tested the DB library.