Restore window size on exit, and cleanup handling of empty macro arguments.