Refactored .compile() to be much more readable and have more steps. Refactored ._resolve to optimize for minimal simultaneous anonymous functions