correct typo creating errors in some cases
removed code from the main program using the lib
Tested and added TODO
created test suite for reffrequency