Re-organized into seperate files

I broke findPath in json and replaceXPath in files, I think I'm just missing an import but I don't know which one sorry.