validation for categories, other clean up