Changes and fixes for TypeScript 0.9, mostly bool -> boolean.