accept also JSON object as input, not only JSON as string, added path as an initialization variable to search-index and matcher, and modularized both so that they can be instantiated instead of using a global static instance