Refactored OneShotSequenceBrain.