Better functional separation
First frequency tests.
Fixed issue with global count.