                 nickname = nickname,
                 myUserID = YepUserDefaults.userID.value,
                 me = userWithUserID(myUserID) {
-                    let realm = RLMRealm.defaultRealm()
-                    realm.beginWriteTransaction()
+                    let realm = Realm()
+                    realm.beginWrite()
                     me.nickname = nickname
-                    realm.commitWriteTransaction()
+                    realm.commitWrite()
             }
         }
         }()

//

import UIKit
import Realm

let v1AccessTokenKey = "v1AccessToken"
let userIDKey = "userID"

                avatarURLString = avatarURLString,
                myUserID = YepUserDefaults.userID.value,
                me = userWithUserID(myUserID) {
                    let realm = Realm()
                    realm.beginWrite()
                    me.avatarURLString = avatarURLString
                    realm.commitWrite()
            }
        }
        }()
