Improvements to the documentation and style fixes