finished init files
refactored index.js
finished refactor