Some more generalization to the Makefile
addToFrontier()