Generalized some of the multiblock code into a stricter format