Refactor Sequencer to Sequence and implement logical functions