Abstract database save logic out of resource into database helper class
Code cleanup and formatting
Get rid of dead code which was populating in memory array of events