Move Javascript in extra file