Now compatible with Python 3; automated testing begun

Apologize for the large number of apparent changes. My editor trims whitespace at the end of line (for PEP-8) compatibility. I didn't realize the original copy did not use that convention until I saw how many lines are in the pull request.