moving compiler code out of gant for easier testing