Fix calculations and add a header with the time information.