Database now working - no bugs