added filetype detection created directory structure to automatically put files in right place