Resolved issue #48 and removed pep8 warnings