Moved frequency analysis to tools