Define TLong for non-windows
Add missing stdio include
Move visualization functions out of helpers. Add conditional compilation (win only) for visualization functions.