Fixed the AST (frees all nodes now and fixes a missing destructor)