Modify the layout and add some functions