SONAR-5056 Minor refactoring
SONAR-5056 Refactoring of restore feature