Added application stuff.
Cleanup in OffscreenGL and xml creation.
cleanup.