Refactored and added few tests to CGLProgram