Fix memory problems in set table features, clean up loop indexes.
Add simple validations to table feature request.