Refactored main function; calculate average fitness per generation