Crafting bug fix + refactoring