added missing code
cleaner macros
fixed wstringstreams: multiple stream instances are no longer created