Improved Error Handling.
Reimplemented error handling using BFTask.