Restructure driver so we can share it with hermit-web