Refactors handling of Machine

* adds better constructors to Machine
* function `run` steps through when reducing expression