 }
 
 /**
-Assign a property of a view equal to that property on another view. Useful for things such as settings the top of a view equal to the top of another view.
+Assign a property of a `Swiftlyable` equal to that property on another `Swiftlyable`. Useful for things such as settings the top of a view equal to the top of another view.
 
 - parameter left:  Layout property to assign
 - parameter right: View to equal
 
 - returns: A Swiftly object representing the desired constraint
 */
-public func ==(left: Swiftly, right: AnyObject) -> Swiftly {
+public func ==(left: Swiftly, right: Swiftlyable) -> Swiftly {
     var result = left
     result.toItem = right
     return result
 }
 
 /**
-Assign a property of a view equal to a constant. Useful for things such as settings the top of a view equal to the top of another view.
+Assign a property of a `Swiftlyable` equal to a constant. Useful for things such as settings the top of a view equal to the top of another view.
 
 - parameter left:  Layout property to assign
 - parameter right: Constant to assign

    }

    /**
    Apply a variadic list of Swiftly objects to a view. This is appended to any existing constraints.

    - parameter layout: The layout(s) to apply.

    - returns: An array of constraints that represent the applied layout. This can be used to dynamically enable / disable a given layout.
    */
    func applyLayout(_ layout: Swiftly...) -> [NSLayoutConstraint] {
        return applyLayout(layoutArray: layout)
    }
}

@available(iOS, introduced: 9.0)
public extension UILayoutGuide {

    /**
     Apply an array of Swiftly objects to a layout guide. This is appended to any existing constraints.

     - parameter layoutArray: The layout(s) to apply.

     - returns: An array of constraints that represent the applied layout. This can be used to dynamically enable / disable a given layout.
     */
    internal func applyLayout(layoutArray: [Swiftly]) -> [NSLayoutConstraint] {
        guard let owningView = owningView else {
            fatalError("You must add this layout guide to a view before applying a layout")
        }

        var constraints = [NSLayoutConstraint]()

        for l in layoutArray {
            let attributes: [NSLayoutAttribute]
            if let attrs = l.attributes {
                attributes = attrs
            } else if let attr = l.attribute {
                attributes = [attr]
            } else {
                fatalError("You must define an attribute.")
            }

            let otherAttributes: [NSLayoutAttribute]
            if let otherAttrs = l.otherAttributes {
                otherAttributes = otherAttrs
            } else if let otherAttr = l.otherAttribute {
                otherAttributes = [otherAttr]
            } else if let attr = l.attribute {
                otherAttributes = [attr]
            } else if let attrs = l.attributes {
                otherAttributes = attrs
            } else {
                otherAttributes = []
            }

            for (attr, otherAttr) in zip(attributes, otherAttributes) {
                // toItem should be nil when setting a fixed size
                let toItem = otherAttr == .notAnAttribute ? nil : (l.toItem ?? owningView)

                let constraint = NSLayoutConstraint(
                    item: self,
                    attribute: attr,
                    relatedBy: l.relatedBy ?? .equal,
                    toItem: toItem,
                    attribute: otherAttr,
                    multiplier: l.multiplier,
                    constant: l.constant)

                if let priority = l.priority {
                    constraint.priority = priority
                }

                constraints.append(constraint)
            }
        }

        owningView.addConstraints(constraints)
        return constraints
    }

    /**
     Apply a variadic list of Swiftly objects to a view. This is appended to any existing constraints.

     - parameter layout: The layout(s) to apply.

     - returns: An array of constraints that represent the applied layout. This can be used to dynamically enable / disable a given layout.
     */
    func applyLayout(_ layout: Swiftly ...) -> [NSLayoutConstraint] {
        return applyLayout(layoutArray: layout)
    }
}

/**

    var otherAttributes: [NSLayoutAttribute]?
    var multiplier: CGFloat
    var constant: CGFloat
    var toItem: Swiftlyable?
    var priority: UILayoutPriority?

    init(_ a: NSLayoutAttribute? = nil, attributes atts: [NSLayoutAttribute]? = nil, relatedBy r: NSLayoutRelation? = .equal, toItem ti: Swiftlyable? = nil, otherAttribute oa: NSLayoutAttribute? = nil, otherAttributes otherAtts: [NSLayoutAttribute]? = nil, multiplier m: CGFloat = 1, constant c: CGFloat = 0) {
        attribute = a
        attributes = atts
        relatedBy = r
