Layout code cleanup.