Refactore upon remembering that 1 is not a prime