Made stats gathering more efficient.