getNextBlockNumber almost done. Code for direct and indirect block numbers