 /**
     Simple layout that positions one child according to its gravity.
 */
-struct GravityLayout: BayaLayout {
-    var layoutMargins: UIEdgeInsets
-    var frame: CGRect
+public struct BayaGravityLayout: BayaLayout {
+    public var layoutMargins: UIEdgeInsets
+    public var frame: CGRect
 
     private var element: BayaLayoutable
     private let gravity: (BayaLayoutOptions.Gravity.Horizontal, BayaLayoutOptions.Gravity.Vertical)

            size: size))
    }

    func sizeThatFits(_ size: CGSize) -> CGSize {
        let fit = sizeThatFitsWithMargins(of: element, size: size)
        return addMargins(size: fit, element: element)
    }
}

// MARK: Gravity shortcuts

public extension BayaLayoutable {
    func gravitate(to horizontalGravity: BayaLayoutOptions.Gravity.Horizontal) -> BayaLayoutable {
        return GravityLayout(
            element: self,
            gravity: (horizontalGravity, .top))
    }

    func gravitate(to verticalGravity: BayaLayoutOptions.Gravity.Vertical) -> BayaLayoutable {
        return GravityLayout(
            element: self,
            gravity: (.left, verticalGravity))
    }

    func gravitate(
        horizontally horizontalGravity: BayaLayoutOptions.Gravity.Horizontal,
        vertically verticalGravity: BayaLayoutOptions.Gravity.Vertical) -> BayaLayoutable {
        return GravityLayout(
            element: self,
            gravity: (horizontalGravity, verticalGravity))
    }

        self.frame = CGRect()
    }

    public mutating func layoutWith(frame: CGRect) {
        self.frame = frame
        let size = sizeThatFitsWithMargins(of: element, size: frame.size)
        var point = CGPoint()
