Code cleanup. Begin adding makeWave function.