Implemented some abstraction in preparation for routing.
Merge branch 'master' of https://github.com/gears88/YRS2013

Conflicts:
	js/main.js