repair some indentation in layout and put js at the end