 //
 //  BMXAvatarView.swift
 //  BMXAvatarView
+//  https://github.com/mbigatti/BMXAvatarView
 //
-//  Created by Massimiliano Bigatti on 08/07/14.
 //  Copyright (c) 2014 Massimiliano Bigatti. All rights reserved.
 //
 
 import Foundation
 
+/**
+    A rounded avatar UIImageView, with optional border and vibrance effect.
+*/
 @IBDesignable public class AvatarView : UIView {
+    
     
     // MARK: - Private Properties
     
+    /// backing image view used to display image
     private var imageView = UIImageView()
+    
+    /// activity indicator displayed while the image is updated
     private let activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .WhiteLarge)
     
     
     // MARK: - Public Properties
     
+    /// avatar border width, default 2px
     @IBInspectable public var borderWidth : CGFloat = 2 {
     didSet {
         self.layer.borderWidth = borderWidth
     }
     }
     
+    /// avatar border color, default clear
     @IBInspectable public var borderColor : UIColor = UIColor.clearColor() {
     didSet {
         self.layer.borderColor = borderColor.CGColor

    }
    }
    
    @IBInspectable public var avatarImage : UIImage? {
    didSet {
        applyFilter()
    }
    }
    
    @IBInspectable public var vibranceAmount : CGFloat = 0 {
    didSet {
        applyFilter()

    
    // MARK: - Privates
    
    /**
        Apply vibrancy effect filter showing the activity indicator if required
     */
    private func applyFilter() {
        if (avatarImage == nil) {
            return
