Added new POpen with windows support since windows builtin _popen pops up a window on each call which is not acceptable. Removed a bunch of warnings as well.