Many changes towards removing usage of item ID's.

This should have no effect on the running of the plugin.