Convert preferences window to layout kit.

Fixes #25.