Added vars.js (effectively a store), and update.js for refactoring.