refactor legacy page controllers