[DF-4113] Fix review comments + small refactoring.