Added complete handler and change other handlers

Updated success and fail handlers to more closely match jQuery's
handlers.