Fix plenty of bugs. Add VC support.