         }
 
         @objc func onFinishSyncing(notification: NSNotification) {
-            profile.prefs.setTimestamp(NSDate.now(), forKey: PrefsKeys.KeyLastSyncFinishTime)
+            self.prefs.setTimestamp(NSDate.now(), forKey: PrefsKeys.KeyLastSyncFinishTime)
         }
 
         var prefsForSync: Prefs {
-            return self.profile.prefs.branch("sync")
+            return self.prefs.branch("sync")
         }
 
         func onAddedAccount() -> Success {


    // Extends NSObject so we can use timers.
    class BrowserSyncManager: NSObject, SyncManager {
        unowned private let profile: BrowserProfile
        let FifteenMinutes = NSTimeInterval(60 * 15)
        let OneMinute = NSTimeInterval(60)



        init(profile: BrowserProfile) {
            self.profile = profile
            self.prefs = profile.prefs

            super.init()

            let center = NSNotificationCenter.defaultCenter()
