function template, minor touch up

typedef, auto