Use new, not malloc for consistancy with eventual delete call
Change the way PS_Stream is created to allow it to be replaced by an alternative
Fix MSVC warning - compiler unhappy about using static cast on a constant
Fix MSVC compile error - compiler cannot convert double to u64
Fix coding issues raised by valgrind
Fix compiler warning for unsigned < 0
Tone down the logging when in info mode
Fix compiler warning on win32