refactoring
Refactoring
Deleted commented lines
Improved depth sorting