replace enums usage with constants where possible for distribution. make distribution's enums.js file smaller.