#213 #256 Refactoring index.js (Entire Code Modulization)