refactor data loading in sidebar
sort file tree