         //assert(context != nil, "No GraphContext available")
         assert(property.uid != nil, "KeyNode without a uid")
         
-        var lastProperty = propertiesArray.last
+        let lastProperty = propertiesArray.last
         
         if (lastProperty != nil) {
             // it seems this element has already one or more properties

        var previousProperty:Property? = nil
        var nextProperty:Property? = nil
        
        var nextPropertyID:UID = property.nextPropertyID
        var previousPropertyID = property.previousPropertyID
        
        if (nextPropertyID > 0) {
            nextProperty = context!.readProperty(nextPropertyID)

    func createPropertyForKeyNode(keyNode:Node) -> Property {
        assert(context != nil, "No GraphContext available")
        
        let property = Property(graphElement: self, keyNode: keyNode)
        
        context!.registerProperty(property)
        addProperty (property)
