Refactor SimpleMachine