add AST, equality and minor changes