moved agent registration code to shared file
support tiles for wp7.8; fixed bug that prevented tiles from updating.