css and js modified to use layout template