Added some validation/sanitation.