added clear function
fixed bug where clear throws error if passiveOutput doesnt exist
Merge branch 'feature/clear' into develop