Refactoring to support WindowsPhone merge.