Refactored. Moved dictionary creation and calculate_revenue call  out of main()