Remove the use of stringstream