cleaned up code
I made it prettttty
Removed all global variables
validation checks for file upload
"incorrect file name" checks
fixed an output line