Format text correctly