Refactors to use dynamic routes