refactoring to better handle asynchronous routing events during page processing