DF-5579 fixed crash
DF-5579 optimization
DF-5579 Entity refactoring