Refactor edge driver creation into a method