mumuki.load(() => {
  mumuki.kindergarten = {
    speak(selector, locale) {
      const msg = new SpeechSynthesisUtterance();
      msg.text = $(selector).text();
      msg.lang = locale.split('_')[0];
      msg.pitch = 0;
      window.speechSynthesis.speak(msg);
    },
    showContext() {
      mumuki.kids.showContext();
    },
    disablePlaySoundButtonIfNotSupported() {
      if (!window.speechSynthesis) {
        const $button = $('.mu-kindergarten-play-description')
        $button.prop('disabled', true);
        $button.css('cursor', 'not-allowed');
        $button.children('i').removeClass('fa-volume-up').addClass('fa-volume-off');
      }
    },
    toggleHint() {
      $('.mu-kindergarten-light-speech-bubble').toggleClass('open');
    },
    toggleHintMedia() {
      const $hintMedia = $('.mu-kindergarten-hint-media');
      const $i = $('.expand-or-collapse-hint-media').children('i');
      $i.toggleClass('fa-caret-up').toggleClass('fa-caret-down');
      $hintMedia.toggleClass('closed');
    },
    showOrHideExpandHintButton() {
      const $button = $('.expand-or-collapse-hint-media');
      const $hintMedia = $('.mu-kindergarten-hint-media');
      if (!$hintMedia.get(0)) $button.addClass('hidden');
    },
    modal: {
      _activeSlideImage() {
        return $('.mu-kindergarten-context-image-slides').find('.active');
      },
      clickButton(prevOrNext) {
        this._activeSlideImage().removeClass('active')[prevOrNext]().addClass('active');
        this.showNextOrCloseButton();
        this.hidePreviousButtonIfFirstImage();
      },
      nextSlide() {
        this.clickButton('next');
      },
      prevSlide() {
        this.clickButton('prev');
      },
      showNextOrCloseButton() {
        const $next = $('.mu-kindergarten-modal-button.mu-next');
        const $close = $('.mu-kindergarten-modal-button.mu-close');
        if (this._activeSlideImage().is(':last-child')) {
          $next.addClass('hidden');
          $close.removeClass('hidden');
        } else {
          $close.addClass('hidden');
          $next.removeClass('hidden');
        }
      },
      hidePreviousButtonIfFirstImage() {
        const $prev = $('.mu-kindergarten-modal-button.mu-previous');
        if (this._activeSlideImage().is(':first-child')) {
          $prev.addClass('hidden');
        } else {
          $prev.removeClass('hidden');
        }
      }
    },
    resultPopup: {
      _showOnSuccessPopup(data) {
        mumuki.kids._showOnSuccessPopup(data);
        $('#kids-results .modal-content').addClass(data.status);
      }
    }
  };

  $(document).ready(() => {

    if ($('.mu-kindergarten').get(0)) {

      mumuki.resize(() => {
        mumuki.kids.scaleState($('.mu-kids-states'), 40);
        mumuki.kids.scaleBlocksArea($('.mu-kids-blocks'));
      })

      mumuki.kindergarten.showOrHideExpandHintButton();
      mumuki.kindergarten.disablePlaySoundButtonIfNotSupported();

      mumuki.kindergarten.modal.showNextOrCloseButton();

      mumuki.kids.resultAction.passed = mumuki.kindergarten.resultPopup._showOnSuccessPopup;
      mumuki.kids.resultAction.passed_with_warnings = mumuki.kindergarten.resultPopup._showOnSuccessPopup;
      
    }

  })

});

@@ -313,24 +313,64 @@
 wContext();%0A
+      this.modal.showFirstSlideImage();%0A
     %7D,%0A    d
@@ -1292,32 +1292,27 @@
 %0A      _
-activ
+imag
 eSlide
-Image
+s
 () %7B%0A   
@@ -1365,16 +1365,89 @@
 slides')
+;%0A      %7D,%0A      _activeSlideImage() %7B%0A        return this._imageSlides()
 .find('.
@@ -1972,36 +1972,52 @@
 lose');%0A        
-if (
+const isLastChild = 
 this._activeSlid
@@ -2034,35 +2034,33 @@
 s(':last-child')
-) %7B
+;
 %0A          $next
@@ -2052,23 +2052,20 @@
         
-  $next
+this
 .addClas
@@ -2069,162 +2069,110 @@
 lass
-('hidden');%0A          $close.removeClass('hidden');%0A        %7D else %7B%0A          $close.addClass('hidden');%0A          $next.removeClass('hidden');%0A        %7D
+If($next, 'hidden', () =%3E isLastChild);%0A        this.addClassIf($close, 'hidden', () =%3E !isLastChild);
 %0A   
@@ -2296,20 +2296,55 @@
         
-if (
+this.addClassIf($prev, 'hidden', () =%3E 
 this._ac
@@ -2383,46 +2383,351 @@
 d'))
- %7B
 %0A      
+%7D,%0A
     
-$prev.addClass('hidden');
+  showFirstSlideImage() %7B%0A        this._imageSlides().find('img').each((i, el) =%3E this.addClassIf($(el), 'active', () =%3E i === 0))%0A        this.showNextOrCloseButton();%0A        this.hidePreviousButtonIfFirstImage();%0A      %7D,%0A      addClassIf(element, clazz, criteria) %7B%0A        if (criteria()) %7B%0A          element.addClass(clazz)
 %0A   
@@ -2750,21 +2750,23 @@
         
-$prev
+element
 .removeC
@@ -2766,32 +2766,29 @@
 removeClass(
-'hidden'
+clazz
 );%0A        %7D
@@ -3594,22 +3594,16 @@
 sPopup;%0A
-      
 %0A    %7D%0A%0A

Extracting some logic