Added code to deserialize database.