Adjust sampling to the last changes
Calculate work %
Refactor things around a bit

Add a class to calculate and print the stats we need.
Add comments in relevant places about missing features.