refactorized UI components and added index.js