Removed unused callbacks, added delegate and error handler