moved functions to new file

crafting functions moved to seperate file