Rewrote for a more HAL approach, curies added.