More refactoring...
More work on getting the wave editor working again...