50% through index

Function names in index are different so might need to look at other
files to see if they need changing. updated blockio to include global
variables and deleted the repeats.