Remove unused and unsupported js code