Organize js better