Clean up code for printing/storing loss over time