Updated Version of the WaveViewController.m