Cleanup some unused ec.js code

Removes some unused/deprecated code from ec.js.