Added more documentation.
Some minor changes.