Tweaking the inventory script a bit based on real usage

so that (whoops!) vars are included/excluded properly and the query string doesn't have a double ??