code cleanup
add fetch_default_values (weird way of doing this, I was drunk last night)
add fetch_default_values (weird way of doing this, I was drunk last night)
code format
fixed threshold array parse to make it works when no thresholds are set