Various changes to make htings work.