Big refactor to support WinRT & Portable class library.