Fixes #40 and adds mode-local preferences, even.