some misc changes in glx
some refactoring in glx