Made target an options object, with keys and values, as suggested by @ScottDowne.