add todo note
add error event handler option as param
remove unused code in app.js
use jquery's event system () for error and success events