Add typeName() to OpenGL objects, fix some minor problems