Fixed bug which allowed browser to be closed while OnPaint was still running.

Fixed bug which caused texture to be created from random blocks of memory.  It is now created as a clean slate of alpha.

Fixed configuration errors which appeared after merge with master.