Cleaned a bit of the code, also changed the user interface while retrieving the file