Replaced a mess of perl and templates in callback.h with just a mess of c++11 templates...