Made curPage trac
king more efficient