Added (some) validation of (some) input.