Optimized the directory search class and boosted the search script performance. JS code optimization. Added an option that allows changing the root directory.