Use the new ASTs

WIP because I still need to get rid of dynamic_cast (use variant)