Remove use of defadvice

This is the canonical way to execute code when a mode is toggled.
Merge pull request #2 from purcell/patch-1

Remove use of defadvice