added database config as well as API callback handlers.