Cleaned up a few small mistakes in generator.c and made the wave switch statement a bit clearer