Rename main javascript function