Refactored gl_helpers.rs