Minimal changes. Pending: Integration with TK interface.
Minimal change: handle of 'test' button, now it applies frequency changes and then plays the tone.
General code cleanup. Added better documentation.