update doc and pep8 coding style improvements