beautify render script to be easier to diff/patch

hopefully now correct :)