Merge pull request #6 from bradbishop/discard

bug fix and pep8 cleanup