Remove extra whitespace

Some functions were fixed so that extra whitespace in text attributes
are automatically removed