Refactored equip code, testing