Removed duplicates and rearranged maps for better flow