refactoring and decoupling in Tmx
refactoring and decoupling in Tmx