Multiple changes to documentation, code and tests