Sanitized input on contract terms.

Theres probably like 100 more places where this needs to be done