Started implementing StyleFunctionPlugin and improved variable handling
in templates