Implemented recover method
Merge remote-tracking branch 'nicparry/master'

* nicparry/master:
  Implemented recover method
[tree] simplified and tested recovery function