Moved the val() tests from manipulation into attributes.