Abstract page code into separate models