Core Data

Fixing threading problems with Core Data