Refactors save.js into management-console.js.