#13 Adding more tests and fixing database scripts