GREATLY changed the way inventory_get works, removing many bugs and
infinate loops.
Added a file containing the template for metadata