Move JS code to separate file, wrap in a function (interface NOT final).