more metrics and statts refactoring