Refactoring of Python code is done.