Moved hto state specific functionality into hto class