Begin refactor of python controller library. Fix waveform being super wrong but magically working.