Refactored rollover code.