refactored code which created dir structure
refactored code for dir structure
Merge changes from kaushal's repo