Haxe 3 compatibility. Updated to latest version of tilelayer(github)