Create a test function for Wave-Next so that it can be run through Valgrind
without starting the UI. (and fix the memory error it discovered)