 
     required init(coder aDecoder: NSCoder) {
         fatalError("init(coder:) has not been implemented")
+    }
+
+    deinit {
+        NSNotificationCenter.defaultCenter().removeObserver(self, name: NotificationFirefoxAccountChanged, object: nil)
+        NSNotificationCenter.defaultCenter().removeObserver(self, name: NotificationPrivateDataCleared, object: nil)
     }
 
     override func viewDidLoad() {

        } else {
            thumbnailCols = 3
        }
    }

    private func getIndexAtPosition(#y: CGFloat) -> Int {

            make.edges.equalTo(self.view)
        }
        self.collection = collection
        let collectionSize = collection.bounds.size
        self.layout.setupForOrientation(UIView.viewOrientationForSize(collectionSize), atSize: collectionSize)
        self.refreshHistory(layout.thumbnailCount)
    }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        if let collectionSize = collection?.bounds.size {
            self.layout.setupForOrientation(UIView.viewOrientationForSize(collectionSize), atSize: collectionSize)
        }
    }

    override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
        super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
        self.layout.setupForOrientation(UIView.viewOrientationForSize(size), atSize: size)
        self.refreshHistory(self.layout.thumbnailCount)
    }

    override func supportedInterfaceOrientations() -> Int {
        return Int(UIInterfaceOrientationMask.AllButUpsideDown.rawValue)
    }
    
    func notificationReceived(notification: NSNotification) {
