Remove obsolete routes and session setting.