Refactored out driver logic.