Condensing some T4 template code.
More condensing.
Condensing more T4 code, adds comments to Optional