included js in layout, some fixes