The parser almost works... just something weird before it ends

Looks like newPage.endIdx doesn't add everything necessary