Documentation; reworking some classes

Lots of stuff.