Remove unnecessary checks and variables.
History#atRoot handles params without path.
Just slice the root.