Added ability to serialize database and updated the test file accordingly