Starting work on WAVE
Moved over the python version (might adapt it to node)