Remove else from if; added basic primality test