reimplement as a minor-mode.

resolves #3.