refactored tmx loader