Controller code improvements
Attached services to JS window
Added event management functionality