Added event dispatcher, included application.js on main page.