Fixed pages view. refactored to avoid model conflicts