Mash refactoring