Layout and javascript organizational changes