Clean up using functions and template group.  more transition
implementation progress