Added code for helm and skin, optimized functions