Refactored out docker management into separate library. Cleaned things up lots.