Split up filebrowser code