Changed NSManagedObject subclasses to AnyObject for better Objective-C compability