Use resolve instead of forking a process

This vastly simplifies the code by meaning you no longer need to spawn a separate process just for the resolve algorithm.