Added database and handlers...
removed some unused methods...