Minor changes in syntax - function and variable capitalisation changed to conform to PEP8. Changed a print to a raise Exception, so we'll know when freq thing has failed. Removed some comments.