started refactoring controls.js to use fields.js