Remove some variables that are only used once and rename blockBytes to blockData for consistency