fix multiple dependencies, rework filtering, add minimatch support