Updated javascript to use new method names