Small tweaks in headcodeindicator function, and add various paramater descriptions.