Updated StripTrailing Spaces function