cleanup code, less dependency
trying to fix windows build
more cleanup