cleaned up code, removed FrequencyProcessor and FrequencyCalculator