Uncommented sampled instance generation; moved it to a location where it's only called when needed.