Remove duplicated paths and abstract them to params.