Added more ways to check for primeness