Added basic frequency analysis.