Minor fixes in documentation and code