on categories and categories

Refactored some code. Fixed spelling of category and refactored additional methods of NSManagedObject subclasses into categories.