Move the padding stuff into code generator.