Added NSCoding implementation.