Move dependency finding out into its own private module