Refactored out the greedy_improve method. Added it to the random sampler.