Feature/test database

See #313