streamlining the Makefile. incorporates changes from @angrave