Refactored so as to be useful to the interactive flow.
Refactored again to leave AudioGraph untouched.