Finished fist pass of code for block tabulating function.