Elimination duplication with layouts