A bunch of changes to adapt to Tim's new version of pysovo. Lots need
to be changed again though given that we will pull out a new version
of pysovo again to make it more versatile.