[Refactored scheme construction into a separate factory class]