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.
Simplified app creation code.
Merge branch 'release/events'