-Check if target is a file working again
-remove dead code
-Set browse directory path for files
-Add clear history in preferences