Typescript switched from bool to boolean

I switched the code to use boolean rather than bool so it compiles with the latest version of the compiler.
See: https://typescript.codeplex.com/workitem/135 for details.

The js changes are all a result of running tsc on js/app.ts