cleanup TMXLoader code