Added some templating helper functions to the library.