Templates re-added because problem found
Explicit keyword added
Added identity creating function
Scalar functions tested, tweaked
Templated the identity function, re-added explicit keyword