Fix some more rest calls and remove old javascript code.
Fix some more rest calls and remove old javascript code.