Refactoring: id_mapping URL generator (ctrls, views, samples)