Refactored the samples.