     override func layoutSubviews() {
         super.layoutSubviews()
 
-        let imageWidth = frame.width - 2 * Size.insets - 2 * Size.lilBits
-        let imageHeight = frame.height - 2 * Size.insets
-        imagesContainer.frame.size.width = imageWidth * 3 + 2 * Size.insets
+        let imageWidth = frame.width - Size.insets.left - Size.insets.right - 2 * Size.lilBits
+        let imageHeight = frame.height - Size.insets.top - Size.insets.bottom
+        imagesContainer.frame.size.width = imageWidth * 3 + Size.insets.left + Size.insets.right
         imagesContainer.frame.size.height = frame.height
         imagesContainer.frame.origin.x = -imageWidth + Size.lilBits + gestureDeltaX
         imagesContainer.frame.origin.y = 0
 
         let views = [prevImageView, currImageView, nextImageView]
         views.eachPair { prevView, view in
-            view.frame.origin.y = Size.insets
+            view.frame.origin.y = Size.insets.top
             view.frame.size = CGSize(
                 width: imageWidth,
                 height: imageHeight
             )
 
             if let prevView = prevView {
-                view.frame.origin.x = prevView.frame.maxX + Size.insets
+                view.frame.origin.x = prevView.frame.maxX + Size.insets.left
             }
             else {
                 view.frame.origin.x = 0
             }
         }
 
+        currImageFrame = currImageView.frame
+        prevImageView.layer.zPosition = 2
+        currImageView.layer.zPosition = 3
+        nextImageView.layer.zPosition = 2
+
         currLoadingLayer.position = currImageView.frame.center
     }
 

    }

    @objc
    func gestureMovement(gesture: UIPanGestureRecognizer) {
        let translation = gesture.translation(in: self)

        if gesture.state == .ended {
            let velocity = gesture.velocity(in: self)
            let delta: Delta?
            if translation.x < -20 && velocity.x < 0 && delegate?.imageURLsForScreen().next != nil {

        let newPrevURL = urls?.prev
        let newCurrURL = urls?.current
        let newNextURL = urls?.next

        if let imageSuperview = currImageView.superview {
            currImageView.removeFromSuperview()
            imageSuperview.addSubview(currImageView)
        }

        let items = [
            (newPrevURL, prevURL, prevImageView, false),
