Adding in the JavaScript pieces