Some improvements to string and xml classes