Documentation

Slowing readapting the comments to sphinx. A few methods have been
shifted around in some classes.