Updated wp7+wp8 implementation with testing