Fixed a few things in Tilemap and optimised the renderer a little bit.
Updating for TypeScript 0.9.1, part 1.
Whole codebase updated to TypeScript 0.9.1, phew!