Initial version of the compiler and caching mechanism, not quite functional