Added some comments for clarification.
Renamed some elements for clarification.