significant bug fixes in how data is appended. Next index of previous block updated to that of new block