Fixed database structure, fixed unpredictable test failures