added some comments, made sure the popover was properly removed and everything dealloced