Improved markup formatting