Move text wrapping into its own module