Adds better validation.