Added GL generic functions
Refactored Debug class