Improved collision detection for TILES + some small bugs.