trimming whitespaces and newlines in text of service