Refactoring for subcollection routing. TODO: linked