Makefile now uses template properly