Change how dependencies are fetched

Review 1120 and 1155 by @Tryneus