refactoring, deleting elements.js file and its uses