All of this inventory logic should probably be moved out into it's own file/struct.