reordered code and added "back" button to file browser