Various changes and more documentation.