Small refactor and cleanup, trying to figure out why itemdamage fucks up