Cleaned up OpenGL code, removed deprecated code.