Refactoring of AstCompressor