Refactoring for using asm tree api