Adding blockcalc function and tests

The final block parser will be more complex, but this is a good start to
make sure the algorithm i have in mind works