Reducing copy-paste in driver code