Reworked todo.js