remove dangling references to defunct javascript functions