Some minor tweaks

I couldn't really understand much of the templated code, but I was able to notice a capitalization error in madness.hpp and added some safety stuff to the makefile.