proposals.js refactoring