[Driver] Refactor to move all logics in the abstract class

This PR removes the code duplication in the driver classes.