remove punctuation from start and end of URIs
rename flatten method to avoid conflict with URIParsers trait