Redone some tests, fixed database