Cleans up first n primes function