Improved findMin and findMax functions
Started work on finding minimum and max populations.

Min and max function don't work for some reason.