Linter updates and premature validation fix

Some linter updates and fixing premature validation of duplicate
elements