Simple learning refactoring