Added support for ARC.
Improved delegate