Revert "clean up stats panel code"

This reverts commit 1f3a2616db63a6f4ac030f0d75284501a58c0dd5.