 
     public func get(#key: String) -> T? {
         if let weakValueRef = self.entries[key] {
-            self.updateFifo(key, valueRef: weakValueRef?.value)
-            return weakValueRef?.value?.value
+            self.updateFifo(key, valueRef: weakValueRef.value!)
+            return weakValueRef.value?.value
         }
-        else {
-            return nil
-        }
+        return nil
     }
 
     public func remove(#key: String) -> T? {
-        if var weakValueRef = self.entries.removeValueForKey(key) {
-            let value = weakValueRef?.value?.value
-            weakValueRef = nil
-            return value
-        }
-        else {
-            return nil
-        }
+        return self.entries.removeValueForKey(key)?.value?.value
     }
 
     public func clear() {

public class Siegel<T> {
    private let size: Int
    private let gcFactor: Int
    private var fifo: [(key: String, valueRef: Ref<T>?)]
    private var entries: [String: Weak<Ref<T>>?]

    public init(size: Int = 1024, gcFactor: Int = 10) {
        self.size     = size

        self.entries = [:]
    }

    private func updateFifo(key: String, valueRef: Ref<T>) {
        self.fifo.append((key: key, valueRef: valueRef))
        if self.fifo.count >= self.size * self.gcFactor {
            var newFifo: [(key: String, valueRef: Ref<T>)] = []
            var need = self.entries
            while need.count > 0 {
                let fifoEntry = self.fifo.removeLast()
