Abhinav: Added the external storage functionality.