move tmx specific code into layer subclass