Template updates and fixed CSRF problem