draw cursor when shade waveform is active
fix visual glitch in shaded surface + some minor refactoring