Fix bugs.  Add preferences extension point.