Added code commentary.