fixed hook names, added database deletes