Importing John Blischak's work
Merge pull request #30 from gvwilson/merge-thw-funcs

Importing John Blischak's work