Driver extraction part2

this will bring back @zeeyang's work from #184

its not ready for merge, I need to fix a few things