refactoring to Tmx.Server and Tmx.Server unit tests