Refactor tests

* Split Postgres from Sqlite tests
Housekeeping