Initial version of AST support, some refactoring.
Added a primitive animation to the AST expand/collapse.