Adding progress bar and spinner functionality.