Cleanup generated code to reuse erb runtime