Update to code

Did some work. Having trouble with the damage-based items, needs some
more work.