Moved checkGlErrors function to GLUtils and fixing impacted files