Switch to Python 3, and ideally to 3.7.x. This will allow using dataclasses, which can help reduce a lot of boilerplate in the codebase.