refactoring and fixes to Tmx unit tests