Big update of previous addition of functionality to produce targets