Fix Phrase length bug and instrument bug: make instrument a Phrase Listener

Adds tests to confirm bug fixes and other minor changes. Move function
to convert tone to frequency to new theory.utils library.