You really give yourself a hard time.
Don't you think it's finnaly time to check Kmotos Gravity Well code?
Just open the main.cpp of any Coin that have it (KDC, Vent, Mega) and study it. Just reading it will give you some good ideas I am sure. Also about how to do the averaging better/more correctly.
We are a community coin. We don't add features that most people can't relate to. If we add black magic, fewer people will contribute to the vitality of the coin. Then we die.
We are going to restructure the coin so that this stuff is easier to deal with.