Extracting the BLOCK DATA in a separate file. Changes to make it working on macosx