tidy up and check redirection and template loads