Implement flexible target specification

See commit message.
This seems like a `deriving(Decodable)` may be in order?