[DF-348] UI Editor. Fix for DF-637, DF-641, DF-652, DF-653. Some code optimization.