Many Changes were added to fix upload and to save data