Changes again - moved frequency calculations to a static method... for some reason this saves a lot of cpu.