Move logic that creates/cleans up driver to dedicated function.