         for index in 0...(stackedViews.count - 1) {
             if let nLastView = lastView {
                 
-                stackedViews[index].addCustomConstraints(inView: self, toViews: [nLastView, self, self], selfAttributes: [NSLayoutAttribute.top] + hAttributes[index], relations: [NSLayoutRelation.equal] + hRelations[index], otherViewAttributes: [NSLayoutAttribute.bottom] + hAttributes[index], padding: [gapPadding] + hPadding[index])
+                let _ = stackedViews[index].addCustomConstraints(inView: self, toViews: [nLastView, self, self], selfAttributes: [NSLayoutAttribute.top] + hAttributes[index], relations: [NSLayoutRelation.equal] + hRelations[index], otherViewAttributes: [NSLayoutAttribute.bottom] + hAttributes[index], padding: [gapPadding] + hPadding[index])
                 
             } else {
-                stackedViews[index].addCustomConstraints(inView: self, toViews: topLayoutGuide == nil ? nil : [topLayoutGuide!, self, self], selfAttributes: [NSLayoutAttribute.top] + hAttributes[index], relations: [NSLayoutRelation.equal] + hRelations[index], otherViewAttributes: (topLayoutGuide == nil ?  [NSLayoutAttribute.top] : [NSLayoutAttribute.bottom]) + hAttributes[index], padding: [topPadding] + hPadding[index])
+                let _ = stackedViews[index].addCustomConstraints(inView: self, toViews: topLayoutGuide == nil ? nil : [topLayoutGuide!, self, self], selfAttributes: [NSLayoutAttribute.top] + hAttributes[index], relations: [NSLayoutRelation.equal] + hRelations[index], otherViewAttributes: (topLayoutGuide == nil ?  [NSLayoutAttribute.top] : [NSLayoutAttribute.bottom]) + hAttributes[index], padding: [topPadding] + hPadding[index])
             }
             lastView = stackedViews[index]
         }
         
         if let nLastView = lastView {
-            nLastView.addCustomConstraints(inView: self, selfAttributes: [.bottom], relations: [bottomRelation], otherViewAttributes: [.bottom], padding: [-bottomPadding])
-        }
-	}
+            let _ = nLastView.addCustomConstraints(inView: self, selfAttributes: [.bottom], relations: [bottomRelation], otherViewAttributes: [.bottom], padding: [-bottomPadding])
+        }
+    }
     
     public func stackHorizontallViews(
         _ stackedViews: [UIView],



extension UIView {
	
	public class func withAutoLayout() -> UIView {
		let view = UIView()
		view.translatesAutoresizingMaskIntoConstraints = false
		return view
	}
	
	public func addSubviews(_ views: [UIView]) {
		for view in views {
			self.addSubview(view)
		}
	}
    
    @objc public func objcStackViews(
        _ stackedViews: [UIView],

        for index in 0...(stackedViews.count - 1) {
            if let nLastView = lastView {
                
                let _ = stackedViews[index].addCustomConstraints(inView: self, toViews: [nLastView, self, self], selfAttributes: [NSLayoutAttribute.left] + vAttributes[index], relations: [NSLayoutRelation.equal] + vRelations[index], otherViewAttributes: [NSLayoutAttribute.right] + vAttributes[index], padding: [gapPadding] + vPadding[index])
                
            } else {
                let _ = stackedViews[index].addCustomConstraints(inView: self, selfAttributes: [NSLayoutAttribute.left] + vAttributes[index], relations: [NSLayoutRelation.equal] + vRelations[index], otherViewAttributes:  [NSLayoutAttribute.left] + vAttributes[index], padding: [leftPadding] + vPadding[index])
            }
            lastView = stackedViews[index]
        }
        
        if let nLastView = lastView {
            let _ = nLastView.addCustomConstraints(inView: self, selfAttributes: [.right], relations: [rightRelation], otherViewAttributes: [.right], padding: [-rightPadding])
        }
    }
    
    //Horizontal
    func getHorizontalAttributes(forStackViews stackViews: [UIView], horizontalAttributes: [[NSLayoutAttribute]]?) -> [[NSLayoutAttribute]]{
        if let hAttributes = horizontalAttributes {
            let _ = self.validateHorizontalAttributes(forStackViews: stackViews, horizontalAttributes: hAttributes)
            return hAttributes
        }
        else {
            return  stackViews.map({ (view: UIView) -> [NSLayoutAttribute] in
                return [NSLayoutAttribute.centerX, NSLayoutAttribute.width]
            })
        }
    }
    
    func validateHorizontalAttributes(forStackViews stackViews: [UIView], horizontalAttributes: [[NSLayoutAttribute]]) -> Bool {
        let isValid = horizontalAttributes.count == stackViews.count
        if !isValid {
            self.abortWithMessage("The number of views to stack to should equal the number of horizontal attribute sets provided. At the moment you have provided \(stackViews.count) views to stack and \(horizontalAttributes.count) horizontal attribute sets")
        }
        return isValid
    }
    
    func getHorizontalRelations(_ horizontalAttributes: [[NSLayoutAttribute]], horizontalRelations: [[NSLayoutRelation]]?) -> [[NSLayoutRelation]]{
        if let hRelations = horizontalRelations {
            let _ = self.validateHorizontalRelations(horizontalAttributes, horizontalRelations: hRelations)
            return hRelations
        }
        else {
            return  horizontalAttributes.map({ (attributes: [NSLayoutAttribute]) -> [NSLayoutRelation] in
                return attributes.map({ (attribute: NSLayoutAttribute) in
                    return attribute == .centerX ?  NSLayoutRelation.equal : NSLayoutRelation.lessThanOrEqual
                })
            })
        }
    }
    
    func validateHorizontalRelations(_ horizontalAttributes: [[NSLayoutAttribute]], horizontalRelations: [[NSLayoutRelation]]) -> Bool {
        let isValid = horizontalRelations.count == horizontalAttributes.count
        if !isValid {
            self.abortWithMessage("The number of attribute sets used should match the number of NSLayoutRelation sets passed in")
        }
        return isValid
    }
    
    func getHorizontalPadding(_ horizontalAttributes: [[NSLayoutAttribute]], horizontalPadding: [[CGFloat]]?) -> [[CGFloat]]{
        if let hPadding = horizontalPadding {
            let _ = self.validateHorizontalPadding(horizontalAttributes, horizontalPadding: hPadding)
            return hPadding
        }
        else {
            return  horizontalAttributes.map({ (attributes: [NSLayoutAttribute]) -> [CGFloat] in
                return attributes.map({ _ in 0.0})
            })
        }
    }
    
    func validateHorizontalPadding(_ horizontalAttributes: [[NSLayoutAttribute]], horizontalPadding: [[CGFloat]]) -> Bool {
        let isValid = horizontalPadding.count == horizontalAttributes.count
        if !isValid {
            self.abortWithMessage("The number of attribute sets used should match the number of padding sets passed in")
        }
        return isValid
    }
    
    //Vertical
    func getVerticalAttributes(forStackViews stackViews: [UIView], verticalAttributes: [[NSLayoutAttribute]]?) -> [[NSLayoutAttribute]]{
        if let vAttributes = verticalAttributes {
            let _ = self.validateVerticalAttributes(forStackViews: stackViews, verticalAttributes: vAttributes)
            return vAttributes
        }
        else {
