Made changes for a more purly GL version based approach