Added NodeTemplates validation. Some improvements in common valdation method