 {
     NSRunLoop.currentRunLoop().runUntilDate(NSDate(timeIntervalSinceNow: 1))
 }
-while (shouldKeepRunning);
+    while (shouldKeepRunning);

    }()

var shouldKeepRunning = true
let allRoutesTask = getAllRoutesWithParentManagedObjectContext(parentManagedObjectContext: managedObjectContext){
    routes, error -> Void in
    
    if (error)


import Foundation
import NearbyTramsStorageKit
import NearbyTramsNetworkKit
import CoreData

var managedObjectContext: NSManagedObjectContext = {
    let moc = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
