Optimized the string to int and double conversion.