Refactor Driver for better code quality