Restructured the compiler API some more, making it easier to write a caching strategy