Don't pass 'paths' around, It's a static variable
Apply IntelliJ's suggestions to code.
Change 'adjacencies' to 'neighbours'