 
     private func itemReferencesInLoginItems() -> (thisReference: LSSharedFileListItemRef?, lastItemReference: LSSharedFileListItemRef?) {
         let bundleURL: NSURL = NSBundle.mainBundle().bundleURL
-        if let loginItemsRef = loginItemsReference() {
+        if let loginItemsRef = loginItemsReference {
             let loginItems: NSArray = LSSharedFileListCopySnapshot(loginItemsRef, nil).takeRetainedValue() as NSArray
             if loginItems.count > 0 {
                 let lastItemReference: LSSharedFileListItemRef = loginItems.lastObject as! LSSharedFileListItemRef

        }
    }
    
    // MARK: Initialization
    
    init() {}

        startAtLogin = !startAtLogin
    }

    private func makeLoginItem(shouldBeLoginItem: Bool) {
        let itemReferences = itemReferencesInLoginItems()
        if let loginItemsRef = loginItemsReference {
            if shouldBeLoginItem {
                let bundleURL: NSURL = NSBundle.mainBundle().bundleURL
                LSSharedFileListInsertItemURL(loginItemsRef, itemReferences.lastItemReference, nil, nil, bundleURL, nil, nil)
