Improvements to layout reversion