Remove alot of dead code from javascript.
More cleanup to remove deprecated methods.