fixed templating stuff with auto, and added c++0x to makefile