clean up activities.py code
Clean up crossdomain.py code.