Reformatting the javascript to a different style