template and form code updates