Refactors layout debugging output