Minor changes to the documentation and some code clean-up.