refactored code that would able to cater using require, added proper folder structuring per modules