Fixed 2 bugs in handling of range switch buttons.
Switch boundary and rangeSwitch buttons from input to div, fix spacing of range entry.
Fix handling of scalar extrema when switching ranges.
Fix whitespace and indentation, convert tabs to spaces.