Factored mlish_compile

Test Plan:
<see below>