remove redundant code and imports in main.js and helpers.js