Refactoring for PyGlass and PySide updates.