Added HTCircuit model and example code
Fixed a few errors in HTcircuit example but resampling is broken