Several fixes
More fixes
Added test database