Remove a series of debug messages Add some code to remove heading or trailing characters after the split