Fix blockSize computation when itemSize does not divide blockSize.
Change a bunch of throw statements to asserts.