new: Extract class refactor, for python