A few bug fixes & use native long long for page numbers