Move auto generation code to sls since otherwise newline passing does not work.