I was upgrading old dependencies, among other things. I did address a couple of security issues, but my main problems where code written and dependencies chosen to provide backwards support for Python 2 (which certain stakeholder considers essential in 2016). The refactoring consisted of eliminating awkward code needed to support Python 2, restructuring the code (two libraries) to use modern dependencies and cleaner patterns.