Refactor getBlocks, a cleaner pull

Single clean re-work of
https://github.com/concrete5/concrete5/pull/842