TEZ-831. Reduce line length of state machines (bikas)