Start to add preferences

Signed-off-by: Wu Xudong <tikiet@gmail.com>