Added a few basic waveform macros and handler function.