Fix cpus average

The original method was messy and buggy, randomly mis-calculating the average usage of the cpus.

I rewrote the method in a more conscious way, fixing #40.