Add comments to header and navbar, switch the location of a statement in formtemplate to avoid errors