Add single class to replace sine/square wave generators.
Reformat some files.