Tried to cut down on code in electedImageChanged.