Refined showPrimes a bit. Program appears to work as it should now