Rewrote item repair

I like his style more, it's easier to read