Added multidirectionality to inventory extractor