Refactor compiler api: make it a simple module and implements make_command and compile.