Remove use of defadvice

This is the canonical way to execute code when a mode is toggled.