Added docs to activityProvider.
Fixed minor bugs in activityProvider.