Merged two files into one

Merged the main script with the file-selector file into one file.

Few lines refactored, but I have to make it more easy to read.