Added documentation to the metrics collector code.