Refactor page model and fix guard