Making (mostly) pep8 compliant
Made pep8 compliant and increased efficiency of the count_change method.