Minor refactor of page_state_spec