Incorporated NSCoding protocol and NSKeyedArchiver/Unarchiver for data persistence.