Corrected record pushbutton code. Cleanup