Stagedriver fixes and refactoring

fixes #181 fixes #182 fixes #183