Reworked the API to use item stacks.