T4 duplication refactoring. Added ability to set explict id