Sort of working version, doesnt propagate totals
Upgraded code to recursively calculate the total header includes