Cleanup of pitch code. Still not successfully generating a tone but is cleaner than it was.