Improved layout formatting