Implement flexible target specification

See commit message.
Whoops, missed a bang!