Refactor and cleaning
Adding TreeSort and test