merging two files into one

merging the two files into one. partial commit
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.