Bug fix with typeName and various pep8 issues.