Main code rev. 1741

Pulled license field setup into its own template.