Changed the Database code to work with serialized objects.