Completely redesigned the template page, minimizing the amount of duplicate information present.
Also using id's present instead of using variables defined in the THISISTHEKEY constant.
This will never work the first time around.