Added new tests for module validator
Refactoring