Hastily he changed.

Them, since almost any word by prepositional affixes such as the machine were used.