   }
 }
 
-extension UIView {
-  func setWidthConstraintToCurrent() {
+private extension UIView {
+  private func setWidthConstraintToCurrent() {
     setWidthConstraint(bounds.width)
   }
 
-  func setHeightConstraintToCurrent() {
+  private func setHeightConstraintToCurrent() {
     setHeightConstraint(bounds.height)
   }
 
-  func setWidthConstraint(width: CGFloat) {
+  private func setWidthConstraint(width: CGFloat) {
     addConstraint(NSLayoutConstraint(item: self, attribute: .Width, relatedBy: .Equal, toItem: nil,
       attribute: .NotAnAttribute, multiplier: 1, constant: width))
   }
 
-  func setHeightConstraint(height: CGFloat) {
+  private func setHeightConstraint(height: CGFloat) {
     addConstraint(NSLayoutConstraint(item: self, attribute: .Height, relatedBy: .Equal, toItem: nil,
       attribute: .NotAnAttribute, multiplier: 1, constant: height))
   }

  }
}

// MARK: - Helpers
extension StatefulTableView {
  func pinView(view: UIView, toContainer container: UIView) {
    let attributes: [NSLayoutAttribute] = [.Top, .Bottom, .Leading, .Trailing]
    apply(attributes, ofView: view, toView: container)
  }

  func centerView(view: UIView, inContainer container: UIView) {
    let attributes: [NSLayoutAttribute] = [.CenterX, .CenterY]
    apply(attributes, ofView: view, toView: container)
  }

  func centerViewHorizontally(view: UIView, inContainer container: UIView) {
    apply([.CenterX], ofView: view, toView: container)
  }

  func centerViewVertically(view: UIView, inContainer container: UIView) {
    apply([.CenterY], ofView: view, toView: container)
  }

  func apply(attributes: [NSLayoutAttribute], ofView childView: UIView, toView containerView: UIView) {
    let constraints = attributes.map {
      return NSLayoutConstraint(item: childView, attribute: $0, relatedBy: .Equal,
        toItem: containerView, attribute: $0, multiplier: 1, constant: 0)

    super.layoutSubviews()
    tableView.frame = bounds
    staticContentView.frame = bounds
  }
}

