Remove test db

1ed2239 accidentally added `test.db`, because only db files in the `test` directory are ignored. So I've removed the db from the repo and set the save path for the the db to the test directory.

Also did some minor cleanup in addition to 1ed2239