Optimized/refactored and optimized GLUS. Removed minor bug.