update deprecated csrf method; rm unused packages