Refactor application.js
Refactor index
Update TODO.md
[skip ci]