=Meat of Calculate Frequency completed
vCalculateFrequency tested, works as expected for
non threaded enviroment.
todo: add in lock checks