Removed bugs, added selection of top frequencies