     }
     public var selectedImage: MediaViewerImageModel?
     public var currentPage: Int = 0
-    let inbetweenImagesMargin: CGFloat = 4.0
+
+    private struct Constants {
+        static let pageSpace: CGFloat = 4.0
+        static let leadingMargin: CGFloat = pageSpace / 2
+    }
 
     public var hiddenImageView: UIImageView?
 

        }
    }

    private func contentViewFrame(index: Int) -> CGRect {
        return CGRect(x: (bounds.size.width + inbetweenImagesMargin) * CGFloat(index),
                      y: 0.0,
                      width: bounds.size.width,
                      height: bounds.size.height)
    }

    private func contentViewWithImageModel(_ imageModel: MediaViewerImageModel?, frame: CGRect) -> MediaViewerInteractiveImageView {
        let contentView = MediaViewerInteractiveImageView(frame: frame)
        contentView.imageModel = imageModel
        scrollView.addSubview(contentView)

        return contentView
    }


    override public func layoutSubviews() {
        super.layoutSubviews()

        scrollView.contentSize = contentSize()

        for (index, image) in contentViews.enumerated() {
            image.frame = contentViewFrame(index: index)
        }

        if let currentImage = currentImageView() {
            scrollView.contentOffset = CGPoint(x: currentImage.frame.origin.x - Constants.leadingMargin, y: 0.0)
        }
    }

    // MARK: public
