* Simplify code by dropping support for legacy Python * sort() --> sorted()
* doctest updates * remove unused math import * cleanup (suggestions) * cleanup - Dict fix (TravisCI error)