Tweaking event handlers, nulling variables

Played with image compression in the test scripts also.