Refactoring of some mix tasks