Minor cleanup, and use mouse grabbing for gfx_app.