progress on abstracting index page write