Updated heading algo
Merged files