 import UIKit
 import UICollectionViewLeftAlignedLayout
 
-@IBDesignable public class UITags: UIView, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
+@IBDesignable 
+public class UITags: UIView, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
     
-    @IBInspectable var tagColor:UIColor?
-    @IBInspectable var tagSelectedColor:UIColor?
+    @IBInspectable var tagColor: UIColor?
+    @IBInspectable var tagSelectedColor: UIColor?
     
     @IBInspectable var fontSize: CGFloat = 11.0
-    @IBInspectable var fontFamily: String = "System"
-    @IBInspectable var textColor:UIColor?
-    @IBInspectable var textColorSelected:UIColor?
+    @IBInspectable var fontFamily = "System"
+    @IBInspectable var textColor: UIColor?
+    @IBInspectable var textColorSelected: UIColor?
     
-    @IBInspectable var tagHorizontalDistance:CGFloat = 2
-    @IBInspectable var tagVerticalDistance:CGFloat = 3
+    @IBInspectable var tagHorizontalDistance: CGFloat = 2
+    @IBInspectable var tagVerticalDistance: CGFloat = 3
     
-    @IBInspectable var horizontalPadding:CGFloat = 3
-    @IBInspectable var verticalPadding:CGFloat = 2
+    @IBInspectable var horizontalPadding: CGFloat = 3
+    @IBInspectable var verticalPadding: CGFloat = 2
     
-    private var collectionView:UICollectionView?
+    private var collectionView: UICollectionView?
 
     override public func prepareForInterfaceBuilder() {
         super.prepareForInterfaceBuilder()
         self.tags = ["This", "is","a", "demo","for", "storyboard",".", "Please","make", "an","outlet", "and", "specify", "your", "own", "tags"]
     }
     
-    public var delegate:UITagsViewDelegate?
+    public var delegate: UITagsViewDelegate?
     
-    public var tags:[String] = [] {
+    public var tags: [String] = [] {
         didSet {
             self.createTags()
         }
     }
     
-    private var selectedTags:[Int] = []
+    private var selectedTags = [Int]()
     
     required public init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)

    }
    
    private func configureCell(cell: UICollectionViewCell, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        let cellToConfigure = cell as! UITagCollectionViewCell
        cellToConfigure.fontFamily = self.fontFamily
        cellToConfigure.fontSize = self.fontSize
        cellToConfigure.textColor = self.selectedTags.contains(indexPath.row) ? self.textColorSelected : self.textColor

    }
    
    public func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAtIndex section: Int) -> UIEdgeInsets {
        return UIEdgeInsetsZero
    }
    
    //MARK: - collection view delegate implementation
