Added documentation comments (summaries only).
Some methods/functions 'x' & 'y' as the parameter names; these have been changed to the more-descriptive names 'key' and 'value'.