First commit: finished naive IR generation