Refactoring a bunch of shared code into the base class of PartPreview3DWidget