         let userTitleYOffset = 124
         let userBioYOffset = 160
         
-//        let headerStackView = UIStackView()
-//        
-//        headerStackView.axis = .Vertical;
-//        headerStackView.distribution = .EqualSpacing;
-//        headerStackView.alignment = .Center;
-//        headerStackView.spacing = 10;
-        
-//        headerView.addSubview(headerStackView)
-//        
-//        headerStackView.leadingAnchor.constraintEqualToAnchor(headerView.leadingAnchor).active = true
-//        headerStackView.trailingAnchor.constraintEqualToAnchor(headerView.trailingAnchor).active = true
-//        headerStackView.topAnchor.constraintEqualToAnchor(headerView.topAnchor).active = true
-//        headerStackView.bottomAnchor.constraintEqualToAnchor(headerView.bottomAnchor).active = true
-        
-        let userImageView = UIImageView()
-        
-        userImageView.frame = CGRect(x: 0, y: 0, width: 64, height: 64)
-        
-//        userImageView.heightAnchor.constraintEqualToConstant(64.0).active = true
-//        userImageView.widthAnchor.constraintEqualToConstant(64.0).active = true
-        
-        userImageView.center = CGPoint(x: 160, y: 48)
+        //
+        // User image view
+        //
+        
+        let userImageView: UIImageView = {
+            let imageView = UIImageView()
+//            imageView.center = CGPoint(x: 160, y: 48)
+            imageView.frame = CGRect(x: 0, y: 0, width: 64, height: 64)
+            imageView.heightAnchor.constraintEqualToConstant(64.0).active = true
+            imageView.widthAnchor.constraintEqualToConstant(64.0).active = true
+            imageView.translatesAutoresizingMaskIntoConstraints = false
+            return imageView
+        }()
         
         var userProfileImageURL: NSURL! = NSURL(string: "https://www.waterreporter.org/community/images/badget--MissingUser.png")
         
         if let thisUserProfileImageURLString = self.userProfile!["properties"]["picture"].string {
             userProfileImageURL = NSURL(string: String(thisUserProfileImageURLString))
         }
-        
-//        self.imageViewUserProfileImage.kf_indicatorType = .Activity
-//        self.imageViewUserProfileImage.kf_showIndicatorWhenLoading = true
         
         userImageView.kf_setImageWithURL(userProfileImageURL, placeholderImage: nil, optionsInfo: nil, progressBlock: nil, completionHandler: {
             (image, error, cacheType, imageUrl) in

        statStackView.trailingAnchor.constraintEqualToAnchor(statGroupView.trailingAnchor).active = true
        statStackView.bottomAnchor.constraintEqualToAnchor(statGroupView.bottomAnchor).active = true
        statStackView.topAnchor.constraintEqualToAnchor(statGroupView.topAnchor).active = true
//        statStackView.heightAnchor.constraintEqualToConstant(24.0).active = true
        
        //
        // Populate values

        // Display user bio
        //
        
        let userBioLabel: UILabel = {
            let label = UILabel()
            label.textAlignment = .Center
            label.font = UIFont.systemFontOfSize(13, weight: UIFontWeightRegular)
            label.widthAnchor.constraintEqualToConstant(272.0).active = true
            label.numberOfLines = 2
            label.lineBreakMode = .ByTruncatingTail
            label.translatesAutoresizingMaskIntoConstraints = false
            return label
        }()
        
        if self.userProfile!["properties"]["description"].string != "" && self.userProfile!["properties"]["description"].string != "Bio" {
            
//            let userBioLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 272, height: 32))
//            
//            userBioLabel.center = CGPoint(x: 160, y: userBioYOffset)
//            userBioLabel.textAlignment = .Center
//            userBioLabel.font = UIFont.systemFontOfSize(13, weight: UIFontWeightRegular)
//            userBioLabel.numberOfLines = 2
//            userBioLabel.lineBreakMode = .ByTruncatingTail
            
            userBioLabel.text = self.userProfile!["properties"]["description"].string
            
//            userBioLabel.sizeToFit()
            
//            profileTableHeader.addSubview(userBioLabel)
            
        }
        
//        headerView.addSubview(headerStackView)
        
//        headerView.sizeToFit()
        
        let headerStackView: UIStackView = {
            let stackView = UIStackView(arrangedSubviews: [userImageView, userNameLabel, userTitleLabel, userBioLabel])
            stackView.alignment = .Center
            stackView.distribution = .Fill
            stackView.spacing = 8
            stackView.axis = .Vertical
            stackView.translatesAutoresizingMaskIntoConstraints = false
            return stackView
        }()
        
        profileTableHeader.addSubview(headerStackView)
        
        headerStackView.leadingAnchor.constraintEqualToAnchor(profileTableHeader.leadingAnchor).active = true
        headerStackView.trailingAnchor.constraintEqualToAnchor(profileTableHeader.trailingAnchor).active = true
        headerStackView.topAnchor.constraintEqualToAnchor(profileTableHeader.topAnchor, constant: 16.0).active = true
//        headerStackView.bottomAnchor.constraintEqualToAnchor(profileTableHeader.bottomAnchor).active = true
        
        self.submissionTableView.tableHeaderView = profileTableHeader
        
