Refactoring dataprotection cmdlets, also adding in protecting of objects via JSON serialization