Saparating error and success process out of core JS file.

I think it is really bad to keep error and success handling in core file because these actions will be replaced by developers. It will be very annoing to developers to update the file manually on every bundle's update in order to use latest features.