some code formatting and additional checks for FlxTilemapExt