Refactoring the todos form, adding success javascript message