Restructure javascript
Update todo list