More reasonable database handling (for tests etc), although should work better all-round