Samples refactoring