LPS-32831 optimizing logic for layout merging
LPS-32831 Source formatting