The only line you want to remove is line 15, which adds some trailing whitespace. The lines above that are important (one does path decoding, and the other strips the leading `/viaf`).