C++11-ised some of the code, fixed typo in makefile