display rms when drawing a ruler
code cleanup