Various improvements to text and layout