Refactoring of new crafting code