Restructure
Add frequency array plus tests!