pep8 and fixed imports for blocks.py