Update to AutoProfile. Initial integration of Windows code. Not completely tested. Related to issue #46.