Adding a notify function for mentioning success/errors
Error in previous fn..result was a var not a function
Modifying functions to use the new success and failure notifications