Layout refectoring