fix paths to reflect new file system, replace key arrays with grep