Refactor acquire_machine for readability