Improve makefile
Add costToNext to node