Splitting up into modules

Creating services, controllers and templates rather than having
everything in one file.
Merge remote-tracking branch 'origin/master'

Conflicts:
	www/index.html