Removes trailing newlines from add and remove commands