Fix JavaScript error in IE8 by wrapping code

There was an 'script error' in IE8 which has something to do with the
way it interprets the compiled/minified JavaScript. Wrapping the
application specific code in an anonymous function fixes this.

https://www.pivotaltracker.com/story/show/79118096