Now includes update to generate_next_prime(), ie, inclusion of start. Code still lacks readability.