Rename variables to "target" and "command"

The variable "last" seemed a big ambiguous, and there really isn't any reason to shorten "command" to "cmd".