Documentation improvements

This pull request removes a few warnings that occur when building the docs. The identifier hyperlinks should then work better. Also adjust some contracts.