Refactored documentation, using references to reduce number of duplicate comments.