Refactor towards a compiler with only two languages