Avoid memory leaks - remove reference to activity on fragment detach.
Added comments.