Small performance improvements. Also proving that caching the path is giving a lot of performance gain when called in quick succession