Refactoring

- making initialize and loadValidators part of constructor
- replacing iterator based loops with iterable
- fixing tests
- other minor refactorings