uncommented freeNode and fixed function precedence