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 updated the ignore file to ignore all `.db` files.

Also did some minor cleanup in addition to 1ed2239