Getting all the javascript to work