Started refactor of file restore process.