Moved WaveManager class to separate file and changed it so it uses rotf.extend method for class definition