Driver extraction part2

this will bring back @zeeyang's work from #184
We should check for the return value of Register and exit on error.