clean up code. Dont remove required attr on duplicate datasets