repaired layout and js