Added readme. Added option for `target` to be a function.