texts: Improved text manipulation