Refactor a little bit, introduce a machine() helper.