Fixed equip/unequip with some small changes

- Added helper functions
- Fixed Equip/Unequip detection