Refactoring of the file browser + bugfix