documentation and other additions to code