Implemented notifications on presence changes and some fixes