Merge pull request #206 from fragmer/master

Code quality improvement batch #3 (resource download fix, leak fix, onMouseClick documentation)
Merge pull request #208 from fragmer/master

Code quality improvement batch #4 (split up run(), named OpenGL constants, fixed onMouseClick regression)