Minor rewritings in blocks.py.