fixed database entry issues, xml return is put in database, and database controller is now a singleton