Add call statistics to header, and a number of other small fixes