Modified all the samples to utilize the new API