Add preference manager. (Incomplete)