More refactoring and adjusting of both CEP Tools and Waveform code