new layout and delete some unused functions