     }
 
     public override func didSelectPost() {
+        showSpinner()
+        let content = prepContent()
+        postContent(content)
+    }
+}
+
+
+
+private extension ShareViewController {
+
+    func showSpinner() {
         view.addSubview(background)
         animate {
             self.background.alpha = 0.5
         }
         ElloHUD.showLoadingHudInView(view)
-        var content: [PostEditingService.PostContentRegion] = []
-
-        let cleanedText = contentText.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
-        if cleanedText.characters.count > 0 {
-            content.append(.Text(cleanedText))
-        }
-        for preview in itemPreviews {
-            if let image = preview.image {
-                content.append(.ImageData(image, nil, nil))
-            }
-            if let text = preview.link {
-                content.append(.Text(text))
-            }
-        }
-
+    }
+
+    func postContent(content: [PostEditingService.PostContentRegion]) {
         postService.create(
             content: content,
             success: { post in
                 print("Successfully posted from the share controller")
                 //TODO: make sure to track success
-                ElloHUD.hideLoadingHudInView(self.view)
-                self.background.removeFromSuperview()
-                self.extensionContext?.completeRequestReturningItems([], completionHandler: nil)
+                self.donePosting()
+                self.dismissPostingForm()
             },
             failure: { error, statusCode in
                 print("Failed to post from the share controller")
                 //TODO: make sure to track failure
-                ElloHUD.hideLoadingHudInView(self.view)
-                self.background.removeFromSuperview()
-                self.extensionContext?.completeRequestReturningItems([], completionHandler: nil)
+                self.donePosting()
+                self.showFailedToPost()
             }
         )
     }
-}
-
-private extension ShareViewController {
+
+    func donePosting() {
+        ElloHUD.hideLoadingHudInView(self.view)
+        self.background.removeFromSuperview()
+    }
+
+    func dismissPostingForm() {
+        self.extensionContext?.completeRequestReturningItems([], completionHandler: nil)
+    }
+
+    func prepContent() -> [PostEditingService.PostContentRegion] {
+        var content: [PostEditingService.PostContentRegion] = []
+
+        let cleanedText = contentText.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
+        if cleanedText.characters.count > 0 {
+            content.append(.Text(cleanedText))
+        }
+        for preview in itemPreviews {
+            if let image = preview.image {
+                content.append(.ImageData(image, nil, nil))
+            }
+            if let text = preview.link {
+                content.append(.Text(text))
+            }
+        }
+
+        return content
+    }
 
     func checkIfLoggedIn() -> Bool {
         if AuthToken().isPasswordBased {


public class ShareViewController: SLComposeServiceViewController {

    private var notSignedInVC: AlertViewController?
    private var itemPreviews: [ExtensionItemPreview] = []
    private var postService = PostEditingService()
    private lazy var background: UIView = {

            }
        }

        notSignedInVC.addAction(cancelAction)
        self.presentViewController(notSignedInVC, animated: true, completion: nil)
    }
}