[DF-4399] Code moved to separate files, some little corrections.