stringToInventory() now returns a Map instead.

Signed-off-by: Lucas Arnström <lucasarnstrom@gmail.com>