Inventory saving

This pull request is to fix the spammy output that Jarrad committed. The functional totalWeight function is just getting added here because I already committed it.