Replace salvage with redone code

See comments on your latest commit
Merge pull request #9 from Dimpl/patch-1

Replace salvage with redone code