added comment
added some space between code
Moved file type detection code to fileTypes.js