Moved Core Data implementation to own class