Updated to new database format