update documentation/comments throughout