Persist event to the database.

Refactored eventscontroller. Moved code to utils lib.
Added event to app.
Added event category validation.
Now adds event to database.