Templatize callbacks close #59