Minor refactoring visit page with substitution