Update deprecated code
Minor code rearrangement
Code refactoring. Add sorting in left folder view