rearrange codes, now compiledCode only output codes without lib and context, then it can be reused for partial support