Abstractation added with functions
More abstraction downloadIndexFile and downloadImageFile fucntions created