Improved multiline formatting