Refactor of the samples