update tileengine : code refactoring