Refactored Hets class to use the Subprocess helper.

This allows better error handling.