Full code review

Explain in a comment what this map is doing. Rename all variables with more suggestive names.