Cutting off newlines from the beginning and the end for less fearsome troubles