Item retract handled, refactored some code