Improved documentation throughout.