Refactor odd logic [RD-54]