Refactoring samples