designer.js refactoring