This allows us to test them in a bit more isolation.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Created tests and refactored some code along the way Added stat graph util spec, refactored code finsihed up tests and refactors finsihed up tests and refactors