some template additions.  other random fixes