maintain device and file explore open/close state on refresh
code refactoring and cleanup