Use ruby 1.8 syntax
Replace mentions of `agent` with `apply`