Add Stats tests.
Refactor variables names to reflect use.