added validation for unused functions and variables