Added basic database, tests and mock
Updated to include total and headers