rename incorrect variable names; ast->node
make helper member functions inline