Moved preferences configuration to lib.