Turning it from an HTML page into an application.
Making it into a valid JS too.
Turning it to work in different hosts (or rather, fail gracefully in different hosts).