refactoring and changed to pages in Tmx.Server