Fully implemented link protection

Close #6
Fixed saving of protection state