small clean up, test more corner case and pep8.