Added static template properties, better handling of default values, required properties and general tidying up