Add clean exit and offscreen test