A lot of additional documentation and comments.

Some small changes that Erik wanted about syntax.