fixes and cleanups to allow 2D OpenGL output; fixes #32 and #31