Added xprimesGenerator, firstNPrimes && little optimization