Add copyright
Move JavaScript to a dedicated file