Remove unused javascript function. Fixes issue #183 and #184