Removed the sift function out of the sieve to reduce memory usage.
Added comments to the primes function