Fix minor unittest and pep8 issues (Python 2.6)