fixed  minor bugs-

This commit is just before merging the component functions and making
changes in the structure of the code to make the uploaded files in the
correct order