Touched up the template helpers and flags