Made the prime functions do input validation (ie `#isPrime I like trains` won't work now)
Bug fixes on input validation and some other touch-ups