remove dangling commas on template objects, whitespace

template cleanup