some code cleanup
Recovery processes refactor