Improve documentation and rename some things.