Portablity issues, VC, and some other fixes