This parseInt for each scale could be done once in the updateConfig() function.