Refactoring: calling the setBackgroundImage() method for every action using the dispatch event.