Refactor MSU.Command

* Inline outputOffOn
* Add generic folding and foldable functions