code cleanup
fix sharing/tasks.py and code cleanup