refactored the results functions for electoral district and contest summary.