Updated for windows. Fix entry points