Some formatting and report writing