GML code refactoring