split tooltipformatting into header - body - footer

the item lines are now constructed in the function bodyFormatter,
allowing easier customization of the lines