Email notifications and few bug fixes