Clearify the use of db triggers
Change db dump schema format to sql

to enable storing of triggers.
Cleanup and test counting events