file tree reorganization
Improved validator

Tested with rspec.