Refactoring. Move common parts to Descriptor.h