refactored renderer_base template to generate files using an isFirst boo...

...lean instead of map method