Added safety check in Block.setData in case of too large input.
Some cleanup of code and comments.