By TravisCarden: Added shunt definition validation and sanitization.