runningMedian class on playground

Hello,
This all works wonderfully, but-
2 things I do not get in the sketch ...

How to delete counters and variables?
How do I find the value that is most common?
With "mode ()"? If yes how?

Many thanks for your help
Greeting and fun
Andreas