Create preferences module.
Move more things into modules.