Refactor for Windows Runtime support on #7

Refactor and code cleanup for Windows Runtime support