Refactor some greediness computations.
Additional greediness.
Extract time group optimizations.