Refactor pattern matching of response, corrected whitespace