Removed setlocale calls, used rrd_strtod & rrd_snprintf
Fixed some terrible indentations