Sanitize and simplify.